import requests

def get_data(i):
    url = 'https://proxy.jdl.cn/order/findWaybillOrdersByReceiveMobile'
    headers = {
        'authority': 'proxy.jdl.cn',
        'method': 'POST',
        'path': '/order/findWaybillOrdersByReceiveMobile',
        'scheme': 'https',
        'accept': '*/*',
        'accept-encoding':'gzip, deflate, br',
        'accept-language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7',
        'access': 'JDWL-GW',
        'app-key': 'jexpress',
        'appparams': '{"appid":"158","ticket_type":"pc"}',
        'biz-type': 'service-monitor',
        'clientinfo': '{"appName":"c2c","client":"m"}',
        'content-length': '541',
        'content-type': 'application/json; charset=UTF-8',
        'cookie': '__jdc=130163593; __jdv=130163593|baidu|-|organic|not set|1625620070358; pt_key=AAJg5QCoADDay7pl3EWngbrsqsLXuGGnEN0nnUHsVZKxHjSQ7-INpGi2DUMx2sAKdpHr7iTNq60; pt_pin=18718896370_p; pt_token=azdddza7; pwdt_id=18718896370_p; thor=317DF86A79D04E8215965CA2889DDF8141C0DFC4C6C8605D7CDE0621BBAF99F37F8805A145FCB653BAF523077074644E98DF47EBE3382AB6EBF1260A312A5040094FBAD546BF5BFD8733B86A09A2905E72C03504D357EFFFAF78F105FF2C3D5C8AC48A7FF3E05E9217783315F62D43300E840B569B31125FDB6A5B180AFE94B7; pin=%E5%90%9B%E4%B8%B0%E4%BB%93%E5%BA%93; unick=%E5%90%9B%E4%B8%B0%E4%BB%93%E5%BA%93; __jda=130163593.1626660251327738240734.1626660251.1626660251.1626675616.2; __jdb=130163593.1.1626660251327738240734|2.1626675616',
        'event-id': '4492b739-e825-5d75-32db-e22d99c5b841',
        'jexpress-report-time': '1626677062000',
        'jexpress-trace-id': 'f04115b7-13f5-ee6f-39a1-7a2b6516214a',
        'lop-dn': 'jdwl.com',
        'origin': 'https://www.jdl.cn',
        'referer': 'https://www.jdl.cn/',
        'sec-fetch-dest': 'empty',
        'sec-fetch-mode': 'cors',
        'sec-fetch-site': 'same-site',
        'source-client': '4',
        'user-agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36',
        'version': '1.0.0',
    }
    data = '["$cooMrdGatewayUid$",[{"name":"sEcho","value":10},{"name":"iColumns","value":8},{"name":"sColumns","value":",,,,,,,"},{"name":"iDisplayStart","value":%s},{"name":"iDisplayLength","value":10},{"name":"mDataProp_0","value":"waybillCode"},{"name":"mDataProp_1","value":"senderName"},{"name":"mDataProp_2","value":"receiverName"},{"name":"mDataProp_3","value":"goodName"},{"name":"mDataProp_4","value":"weight"},{"name":"mDataProp_5","value":"statusId"},{"name":"mDataProp_6","value":"submitOrderTime"},{"name":"mDataProp_7","value":"status"}]]' %str(i)
    res = requests.post(url,headers=headers,data=data)
    result = res.json()['data']['aaData']
    for data in result:
        print(data)
    
if __name__ == "__main__":
        get_data(0)
